<docs>
  ## 我的
</docs>
<template>
    <!-- 内边距container 开始 -->
    <div class="container" ref="container">
      <my-bread class title="我的"></my-bread>
      <div class="my_pic">
        <div class="person_pic">
          <img class="per_pic" :src="imgSrc" alt  @click="editPic"/>
          <div class="edit_btn_right" @click="editPic">
            <i class="iconfont icon-edit"></i> 上传
          </div>
          <!-- <div class="out" @click="signOut">退出</div> -->
        </div>
          <p class="per_name overflow">{{jbxx.xm}}</p>
      </div>
      <div class="iContent">
        <router-link tag="div" class="my_title" to="/user/resume">
          <p class="myjl1">我的简历</p>
          <span class="mygo"></span>
          <!-- <span class="mygo1"></span> -->
        </router-link>
        <router-link tag="div" class="my_title" to="/test/result">
          <p class="myjl2">我的测评</p>
          <span class="mygo"></span>
        </router-link>
        <router-link tag="div" class="my_title" to="/user/tdList">
            <p class="myjl3">我的投递</p>
            <span class="mygo"></span>
        </router-link>
        <router-link tag="div" class="my_title" to="/user/mynotice">
          <p class="myjl4">我的面试通知</p>
          <span class="mygo"></span>
        </router-link>
        <!-- <router-link tag="div" class="my_title" to="/user/mynotice">
          <p class="myjl5">企业查看</p>
          <span class="mygo"></span>
        </router-link> -->
        <!--<div class="my_title">
          <p class="myjl5">我的反馈</p>
          <span class="mygo"></span>
        </div>-->
        <router-link tag="div" class="my_title" to="/user/sightList">
          <p class="myjl6">我的关注</p>
          <span class="mygo"></span>
        </router-link>
        <router-link tag="div" class="my_title" to="/user/collectList">
          <p class="myjl7">我的收藏</p>
          <span class="mygo"></span>
        </router-link>
        <div class="signOut" @click="signOut">退出登录</div>
      </div>
    </div>
</template>
<script>
import UserInfo from "base/userInfo/userInfo";
import $ from "@/common/js/axios";

export default {
  name: "index",
  components: { UserInfo },
  data() {
    return {
      show:true,
      changFlag: 1,
      jbxx: {
      }
    };
  },
  computed: {
    imgSrc() {
      /* eslint-disable no-undef */
      return `${conf.urlPrefix}/grgl/tpxxCx?changflag=` + this.changFlag + 1;
    }
  },
  methods: {
    // 退出
    signOut(){
      this.$loading = true;
      this.$http
        .get("/logout")
        .then(res => {
          const resData = res.returnData;
          const code = +resData.executeResult;
          if (code == 1) {
            window.location.href = 'http://bjt.beijing.gov.cn/renzheng/open/auth/authorize?client_id=2260&redirect_uri=http://fuwu.rsj.beijing.gov.cn/bjtssomobile/third/redirect&response_type=code&scope=user_info&state=http://fuwu.rsj.beijing.gov.cn/jycy/zyjswwwx/index.html';
          }
        })
        .finally(() => {
          this.$loading = false;
        });
    },
    // 编辑图片
    editPic() {
      this.jbxx.changFlag = this.changFlag;
      this.$router.push({
        path: "/person/baseInfo/uploadPic",
        query: this.jbxx
      });
    },
    /*  查询基本信息 */
    GET_getInfo() {
      this.$loading = true;
      this.$http
        .get("/grgl/grxqCx")
        .then(res => {
          const resData = res.returnData;
          this.jbxx = resData.jbxx;
        })
        .finally(() => {
          this.$loading = false;
        });
    },
  },
  mounted() {
    // this.data = this.$store.state.userInfo;
    this.GET_getInfo();
    if (this.$route.query.changFlag) {
      this.changFlag = this.$route.query.changFlag + 1;
    }
  }
};
</script>
<style scoped lang="scss">
@import "~common/scss/var.scss";
  .container {
    background-color: #f1f1f1;
    padding-bottom: 130px;
    .my_pic {
      width: 100%;
      height: $height-label * 13 * 2;
      background: linear-gradient(90deg, #1d66d4, #00baff);
      // border-top: 2px solid #F1F1F1;
      .person_pic {
        width: $height-box;
        height: $height-box;
        border: 1px solid #dbdbdb;
        margin: 0 auto;
        .per_pic {
          display: inline-block;
          width: 100%;
          height: 100%;
        }
      }
      .per_name {
        margin: 4px auto;
        color: #ffffff;
        height:40px;
        line-height:40px;
        font-size: $font-size-user * 2;
        text-align: center;
      }
    }
    .iContent {
      background-color: #f1f1f1;
      padding: $font-size-sure $height-base/10;
      overflow: hidden;
      .my_title {
        width: 100%;
        height: $height-label * 12;
        line-height: $height-label * 12;
        background-color: #ffffff;
        border-bottom: 2px solid #dbdbdb;
        box-sizing: border-box;
        p {
          float: left;
          height: $height-label * 12;
          line-height: $height-label * 12;
          color: #333333;
          font-size: $font-size-user * 2;
          &.myjl1 {
            background: url("~common/images/myjl.png") $radius-base2 center
              no-repeat;
            background-size: $radius-base2 * 2;
            padding-left: $margin-base * 4;
          }
          &.myjl2 {
            background: url("~common/images/wdcp.png") $radius-base2 center
              no-repeat;
            background-size: $radius-base2 * 2;
            padding-left: $margin-base * 4;
          }
          &.myjl3 {
            background: url("~common/images/wdtd.png") $radius-base2 center
              no-repeat;
            background-size: $radius-base2 * 2;
            padding-left: $margin-base * 4;
          }
          &.myjl4 {
            background: url("~common/images/wdmstz.png") $radius-base2 center
              no-repeat;
            background-size: $radius-base2 * 2;
            padding-left: $margin-base * 4;
          }
          &.myjl5 {
            background: url("~common/images/wdfk.png") $radius-base2 center
              no-repeat;
            background-size: $radius-base2 * 2;
            padding-left: $margin-base * 4;
          }
          &.myjl6 {
            background: url("~common/images/wdgz.png") $radius-base2 center
              no-repeat;
            background-size: $radius-base2 * 2;
            padding-left: $margin-base * 4;
          }
          &.myjl7 {
            background: url("~common/images/wdsc.png") $radius-base2 center
              no-repeat;
            background-size: $radius-base2 * 2;
            padding-left: $margin-base * 4;
          }
        }
        .mygo {
          float: right;
          width: $height-label * 4;
          height: $height-label * 12;
          line-height: $height-label * 12;
          background: url("~common/images/go.png") $radius-base2 center
            no-repeat;
          background-size: $radius-base2 * 2;
          padding-right: $height-width_line;
        }
        .mygo:visited {
          float: right;
          width: $height-label * 4;
          height: $height-label * 12;
          line-height: $height-label * 12;
          background: url("~common/images/down.png") $radius-base2 center
            no-repeat;
          background-size: $radius-base2 * 2;
          padding-right: $height-width_line;
        }
      }
      .signOut{
        width: 100%;
        margin-top: 10px;
        height: $height-label * 12;
        line-height: $height-label * 12;
        background-color: #ffffff;
        border-bottom: 2px solid #dbdbdb;
        box-sizing: border-box;
        font-size: $font-size-user * 2;
        text-align: center;
        font-weight:600;
      }
    }
  }

.edit_btn_right {
  position: absolute;
  top: $height-input + $radius-base*15;
  right: $margin-base*7;
  font-weight: bold;
  color: #fff;
}
.out {
  position: absolute;
  top: 120px;
  right: 20px;
  color: #fff;
  font-weight: bold;
}
</style>
